<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 1.
        var F = function () {};

        Object.prototype.a = function () {
            console.log('a');
        };

        Function.prototype.b = function () {
            console.log('b');
        }

        var f = new F();

        f.a();
        f.b();

        F.a();
        F.b();

        // 2.
        var foo = {},
            F = function () {};
        Object.prototype.a = 'value a';
        Function.prototype.b = 'value b';

        console.log(foo.a);
        console.log(foo.b);

        console.log(F.a);
        console.log(F.b);

        // 3.
        function A() {}

        function B(a) {
            this.a = a;
        }

        function C(a) {
            if (a) {
                this.a = a;
            }
        }
        A.prototype.a = 1;
        B.prototype.a = 1;
        C.prototype.a = 1;

        console.log(new A().a);
        console.log(new B().a);
        console.log(new C(2).a);

        // 4.JavaScript中只有一种数字类型：基于 IEEE 754 标准的双精度
        console.log(123['toString'].length + 123)




        // http://flexboxfroggy.com/
    </script>
</body>

</html>